import { IAskAndAnswerItem, IParamsItem } from '@/utils/questionHandle';
// import {  IQuestionListQuery } from '@/utils/questions';
import { request } from 'umi';

//班级接口
export let getquestionHandle = () => {
    return request('/sxpt/classPlan/getClassInfo')
}
// 
//待处理问答 pending
export let getPendingList = (params: IParamsItem) => {
    return request('/sxpt/answer/wait', { params })
}

// 所有问答
export let getQuestionsAllList = (params: IParamsItem) => {
    return request('/sxpt/answer/all', { params })
}
//屏蔽问题
///sxpt/answer/deleteShield?answerId=8084998312566284288
export let getDeleteShield = (params: string) => {
    return request(`/sxpt/answer/deleteShield?answerId=${params}`)
}
//取消屏蔽
// /sxpt/answer/shield?answerId=8087917564540837888
export let getAnswerShield = (params: string) => {
    return request(`/sxpt/answer/shield?answerId==${params}`)
}
//取消精品
///sxpt/answer/deleteQuality?answerId=8087917564540837888
export let getdeleteQuality = (params: string) => {
    return request(`/sxpt/answer/deleteQuality?answerId=${params}`)
}
//设为精品
// /sxpt/answer/quality?answerId=8087917564540837888
export let getanswerQuality = (params: string) => {
    return request(`/sxpt/answer/quality?answerId=${params}`)
}

//取消屏蔽
//  /sxpt/answer/deleteShield?answerId=8087917564540837888
export let getdeleteShield = (params: string) => {
    return request(`/sxpt/answer/deleteShield?answerId=${params}`)
}
//设置屏蔽
//   /sxpt/answer/shield?answerId=8087917564540837888
export let getanswerShield = (params: string) => {
    return request(`/sxpt/answer/shield?answerId=${params}`)
}

//批量回答
//  /sxpt/answer/replyRightAnswer
export let replyRightAnswer = (data: any) => {
    return request('/sxpt/answer/replyRightAnswer', {
        method: 'POST',
        data
    })
}
    //批量相似问题
// /sxpt/askAndAnswer/selectAnswerList?questionTitle=&type=&isRight=0&pageNum=1&pageSize=10
export let getaskAndAnswer = (params: IAskAndAnswerItem) => {
    return request('/sxpt/askAndAnswer/selectAnswerList', { params })
}